package link.anyauto.fsmgr.util;

import android.widget.Toast;

import link.anyauto.fsmgr.FsmgrApp;

/**
 * Created by Administrator on 2016/7/17.
 */
public class DialogUtil {

    public static void toast(String msg) {
        Toast.makeText(FsmgrApp.getInstance(), msg, Toast.LENGTH_SHORT).show();
    }

    public static void toast(int stringResId) {
        toast(FsmgrApp.stringRes(stringResId));
    }

    public static void toastInThread(final String msg) {
        FsmgrApp.post(new Runnable() {
            @Override
            public void run() {
                toast(msg);
            }
        });
    }

    public static void toastInThread(int stringResId) {
        toastInThread(FsmgrApp.stringRes(stringResId));
    }
}
